import request from '@/utils/request'

export const accountPostService = ({name, password, permissionList}) => {
  return request.post('/admin/api/account',
    {name, password, permissionList}
  );
}

export const accountGetByCondService = ({searchKey, text}) => {
  return request.get('/admin/api/account', {
    params: {
      [searchKey]: text
    }
  })
}

export const accountGetListService = () => {
  return request.get('/admin/api/account/all');
}

export const accountDeleteListService = (id) => {
  return request.delete(`/admin/api/account/${id}`);
}